<script setup>


import { useRouter } from 'vue-router'
const router = useRouter()

const  goList = () => {
  router.push('/list')
}

</script>

<template>

  <!-- main.js -->
   <!-- app.vue 是第一个加载的vue文件 -->
    <!-- 所有的代码加载到app.vue文件里面 -->
 
    <router-link to="/" >首页</router-link>
    <router-link to="/login">登录页</router-link>
    <a href="/login">登录页2</a>

    <div>

      <button  @click="goList">go  List</button>

    </div>
  <router-view></router-view>
</template>

<style scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
</style>
